package com.wuzhiming.istudy.service;

import com.wuzhiming.istudy.pojo.User;

import java.util.List;

/**
 * @ClassName: UserService
 * @Description: (User)表服务接口
 * @Author:zhimingw
 * @Version 1.0
 * @since 2022/3/16 19:03
 */
public interface UserService {
    /**
    * @Description: 查询单条数据
    * @Param: [id]
    * @return: com.wuzhiming.istudy.pojo.User
    * @Author: zhimingw
    * @Date: 2022/3/28
    */
    User queryById(Integer id);

    
    /**
    * @Description: 查询单条数据
    * @Param: [id]
    * @return: com.wuzhiming.istudy.pojo.User
    * @Author: zhimingw
    * @Date: 2022/3/16
    */
    User queryByName(String name);
    
    /**
    * @Description: 查询用户
    * @Param: [user]
    * @return: com.wuzhiming.istudy.pojo.User
    * @Author: zhimingw
    * @Date: 2022/3/23
    */
    User queryUser(User user);

    /**
    * @Description: 添加用户
    * @Param: [name, password]
    * @return: boolean
    * @Author: zhimingw
    * @Date: 2022/3/23
    */
    boolean insertUser(String name,String password);

    /**
     * @Description: 修改数据，哪个属性不为空就修改哪个属性
     * @Param: [admin]
     * @return: boolean
     * @Author: zhimingw
     * @Date: 2021/5/30
     */
    boolean update(User user);

    /**
    * @Description: 查询所有用户
    * @Param: []
    * @return: java.util.List<com.wuzhiming.istudy.pojo.User>
    * @Author: zhimingw
    * @Date: 2022/3/31
    */    
    List<User> queryAll();
}
